﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

public partial class Shop_LinkUs_Manager : PageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            BindData();

            btnOK.Attributes.Add("onclick", "return confirm('" + System.Web.HttpUtility.HtmlEncode("您确信输入的资料无误，并且立即保存吗？") + "');");
        }
    }

    #region Web 窗体设计器生成的代码

    protected override void OnLoad(EventArgs e)
    {
        isRequestLogin = true;                                  //是否需要登录
        RequestLoginPage = this.Request.Url.AbsoluteUri;        //获取决对Url
        isAtFramePageLogin = true;                              //是框架页        

        base.OnLoad(e);
    }

    #endregion

    private void BindData()
    {
        tbContent.Value = PublicFunction.GetOptionsBin("联系我们");
    }

    protected void btnOK_Click(object sender, EventArgs e)
    {
        bool Result = PublicFunction.SetOptionsBin("联系我们", tbContent.Value);

        if (Result)
        {
            Shove._Web.JavaScript.Alert(this.Page, "保存成功。");
        }
        else
        {
            Shove._Web.JavaScript.Alert(this.Page, "保存失败。");
        }
    }
}
